package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;  
import org.apache.ibatis.annotations.Insert;  
import org.apache.ibatis.annotations.Select;  
import org.apache.ibatis.annotations.Update; 

import cn.com.api.entity.ApiT_user_role;

//DAO
public interface T_user_roleMapperBase {

	//根据id查看
    @Select("SELECT * FROM t_user_role  WHERE role_id = #{role_id}")
	public ApiT_user_role findT_user_roleById(Integer role_id);
	
    //查看数据集
    @Select("SELECT * FROM T_user_role")
	public List<ApiT_user_role> findT_user_roles();
	
	//添加
    @Insert("INSERT INTO t_user_role (role_name, add_time,role_type) VALUES (#{role_name}, #{add_time},#{role_type})")
    @Options(useGeneratedKeys = true, keyProperty = "role_id")
    public int insertT_user_role(ApiT_user_role t_user_role);
  	
	//修改
    @Update("UPDATE t_user_role SET role_name = #{role_name}, add_time = #{add_time},role_type=#{role_type} WHERE role_id = #{role_id}")
    public int updateT_user_role(ApiT_user_role t_user_role);
    
    //删除
    @Delete("DELETE FROM t_user_role  WHERE role_id = #{role_id}")
    public int deleteT_user_role(Integer role_id);
 
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
}


